<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />
    <title>{$Img.name}--菜品列表</title>
    <link href="__CSS_USER_PATH__/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__JS_PATH__/jquery-1.8.3-all.js"></script>
    <script type="text/javascript" src="__JS_PATH__/alert/jquery.alerts.js"></script>
    <script type="text/javascript" src="__JS_PATH__/alert/jquery.ui.draggable.js"></script>
    <link href="__JS_PATH__/alert/jquery.alerts.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
        $(function(){
            function addMenu(){
                jConfirm('确认要点菜么？', 'wifi管家提示您', function(mr) {
                    if(mr){
                var a=$('#menuNum', window.parent.document).text();
                a=Number(a);
                a+=1;
                $('#menuNum', window.parent.document).text(a);


                var name=$('.name').val();
                var price=$('.price').val();
                var id=$('.id').val();
                var listId=$('.listId').val();
                $.post(
                        'index.php/User/Index/addGreens/',
                        {
                            'name':name,
                            'price':price,
                            'u_id':id,
                            'listId':listId
                        },
                        function(data){
                            if(data==1){
                                jAlert('点菜成功', 'wifi管家提示您');
                               // history.go(-1);
                            }
                        }
                )
            }
                })
            }
            $('#button').click(function(){

                addMenu();
            })
            $('#dianCaiTu').click(function(){
                addMenu();
            })


        })
    </script>
    <style type="text/css">
        <!--
        * {
            margin:0;
            padding:0;
        }
        body {line-height: 1;}
        ol, ul {list-style: none;}
        img { border:none;}
        a{ text-decoration:none; -webkit-tap-highlight-color:rgba(255,0,0,0);}
        #p_tou {
            width:98%;
            border-bottom:1px solid #ccc;
            line-height:30px;
            margin:5px auto 0;
            font-size:110%;
        }
        #p_tou span {
            display:block;
        }
        #p_tou .t_left {
            float:left;
        }
        #p_tou .t_right {
            float:right;
        }
        .zhnei {
            width:98%;
            margin:10px auto;
        }
        .zhnei .mizy {
            width:48%;
            float:left;
            margin-right:2%;
        }
        .zhnei .mizy img {
            width:100%;
        }
        .zhnei .tbqa {
            width:50%;
            overflow:hidden;
            border-bottom:1px solid #ccc;
            line-height:40px;
        }
        .zhnei .tbqa h2 {
            width:50%;
            color:#311000;
            float:left;
            font-size:130%;
            font-family:"微软雅黑";
        }
        .zhnei .tbqa img {
            width:20%;
            float:right;
        }
        .zhnei p {
            text-indent:2em;
            line-height:35px;
            font-size:110%;
            font-family:"微软雅黑";
        }
        -->
    </style>
</head>

<body>
<div id="pad_left">
    <div class="left_bg"><img src="__IMG_USER_PATH__/left_bg.png" /></div>
    <div class="ly_logo"><img src="{$Img.logo}" /></div>
    <div class="left_nav">
        <ul>
            <li><a target='_self' href="{:U(GROUP_NAME.'/Index/myMuenList')}" ><img src="__IMG_USER_PATH__/tb1.png" />我的菜单（<if condition="!isset($num)"><span id="menuNum">0</span></if><span id="menuNum">{$num}</span>份）</a></li>
            <li><a target='_self' href="{:U(GROUP_NAME.'/Index/newGreens')}" ><img src="__IMG_USER_PATH__/tb2.png" />新加菜品（10份）</a></li>
            <li><a  id="checkOut" ><img  src="__IMG_USER_PATH__/tb3.png" />结账</a></li>
        </ul>
    </div>
</div>
<div id="pad_right">
    <div id=con>

        <ul id=tags>
            <volist name='list' id='m'>
                <if condition='$i eq 1'>
                    <li class=selectTag><a onClick="selectTag('tagContent{$i-1}',this)" target='_self' href="{:U(GROUP_NAME.'/Index/menuList',array('menuid'=>$m['id']))}">{$m.name}</a></li>
                    <else />
                    <li><a onClick="selectTag('tagContent{$i-1}',this)" target='_self' href="{:U(GROUP_NAME.'/Index/menuList',array('menuid'=>$m['id']))}">{$m.name}</a></li>
                </if>
            </volist>
        </ul>
        <div id=tagContent>
            <div class="tagContent selectTag" >
                <p id="p_tou">
                    <span class="t_left">当前：{$listt}>>{$green.name}</span>
                    <span class="t_right">用户:{$uname}&nbsp;&nbsp;&nbsp;&nbsp;桌号：{$tabNum}</span>
                    <span style="clear:both"></span>
                </p>
                <input type="hidden" class='id' value='{$green.id}' />
                <input type="hidden" class='listId' value='{$green.menutypeid}' />
                <input type="hidden" class='name' value='{$green.name}' />
                <input type="hidden" class='price' value='{$green.price}' />
                <div class="zhnei">
                    <div class="mizy"><img id="dianCaiTu" src="__APP_PATH__{$green.img}" /></div>
                    <div class="tbqa">
                        <h2 id="name">{$green.name}</h2><img id="button" src="__IMG_USER_PATH__/caipin_con_03.gif" />
                        <div style="clear:both"></div>
                    </div>
                    <P>{$green.content}</P>
                </div>
            </div>
        </div>

    </div>

</DIV>
</div>

<SCRIPT type=text/javascript>
    function selectTag(showContent,selfObj){
        // 操作标签
        var tag = document.getElementById("tags").getElementsByTagName("li");
        var taglength = tag.length;
        for(i=0; i<taglength; i++){
            tag[i].className = "";
        }
        selfObj.parentNode.className = "selectTag";
        // 操作内容
    }

</SCRIPT>
</div>
<div id="ly_foot">
    <ul>
        <li><a href="{:U(GROUP_NAME.'/Index/menu')}" target="_self"><img src="__IMG_USER_PATH__/tb4.png" />菜单</a></li>
        <li><a href="{:U(GROUP_NAME.'/Index/hotMenu')}" target='_self'><img src="__IMG_USER_PATH__/tb5.png" />热门</a></li>
        <li><a href="{:U(GROUP_NAME.'/Index/tuijian')}" target='_self'><img src="__IMG_USER_PATH__/tb6.png" />推荐</a></li>
        <li><a href="{:U(GROUP_NAME.'/Index/myMuenList')}" target='_self' ><img src="__IMG_USER_PATH__/tb7.png" />已点</a></li>
        <li><a href="javascript:history.go(-1);"><img id='black' src="__IMG_USER_PATH__/tb8.png" />返回</a></li>
    </ul>
</div>
</body>
</html>
